nwnfandomcom-20200213-history
Talk:OnClientEnter event
Adding related functions link The previous link referred to what I suppose was intended to be an internal page on this wiki. I would have created one here but 1) there is no subcategory for functions listed under NWScript, 2) there is no template for functions (yet!) and 3) there is a question in my mind whether it would be appropriate to simply duplicate information already on the Lexicon. I opted to keep this in the same format as the last few module event pages I have accessed. --Iconclast (talk) 20:56, October 7, 2013 (UTC) * 1) See Category:Commands and its subcategories, 2) see Template:Functions, 3) Duplication of functions seems to have stopped after the lexicon became editable in its wikia-like format. WhiZard (talk) 02:14, October 8, 2013 (UTC) :* Ahhh. I see where I steered wrong now. I searched under "Functions" and only found the term hung off of NWScript and no list at that point. I had also checked the drop-down of "For builders" and then "Toolset" which lists NWScript twice. There appears to be a circular reference between Commands and NWScript. I would have expected that Commands would be a subcategory of NWScript rather than the other way around. In any event, the list of functions was not easily found. If someone would like to continue the duplication process for the sake of self-containment, go to it. I see no value otherwise especially since changes to the lexicon wiki versions will occur independently of the nwn wiki, encouraging asynchrony between the two resources. --Iconclast (talk) 04:12, October 8, 2013 (UTC) ::* "Category:Commands" is a subcategory "Category:Language reference" which is a subcategory of "Category:NWScript". The language reference category includes other subcategories that deal with NWScript, such as "Category:Constants". As for duplication, I think its dead now; the prior motivation was to supply information that the lexicon did not have (due to incompleteness or misinformation). Once the lexicon became editable, these problems can be tackled by anyone.WhiZard (talk) 13:27, October 8, 2013 (UTC) ::* Check your search again? I made a few tweaks, and I wonder if they make a difference. (I might also get rid of the "category:language reference" level, but that is for later.) --The Krit (talk) 04:23, October 9, 2013 (UTC) :* Actually, the creation of articles for NWScript commands stopped because I got distracted by other things. It had nothing to do with the Lexicon. (In fact, when I create those articles, I create them from scratch, and only cross-check the Lexicon when I get the suspicion that there might be an important detail that I missed.) --The Krit (talk) 04:20, October 9, 2013 (UTC) * I had changed that from a link to the Lexicon, thinking that I would eventually create that article. I never got around to that one, I guess. --The Krit (talk) 04:14, October 9, 2013 (UTC) :* I believe the disparity is occurring due to the relative knowledge of the subtleties of script construction between a novice like myself and an experienced scripter like you TK, WhiZard and other informed contributors and visitors. I read the page which explains the difference between functions and commands being based on declarations and I think I can grasp that. However, there are two resources that confuse the issue for a learner... 1) the script editor in the toolset which list all commands and functions under the "Functions" tab and 2) the Lexicon which also doesn't make the distinction between the two categories. Understanding that basic fact makes the search easier in this wiki because I can follow the rationale of the links better. I believe there is a significant portion of novice scripters like myself who have never really done much coding with C++ which would have given us a leg up on the overall organization of code construction in NWN. :: So... are all the entries related to coding in the semi-comprehensive list on this wiki only those that do not require declaration (i.e. "commands" using the vernacular)? If so, that would explain why a list of NWScript functions doesn't exist in the NWN wiki. That also brings up a question of why Events are listed under NWScript (referring to the high-level drop-down at the top of the home page under For Builders/NWScript) since they do not appear in the script itself but have the script attached to it except for the command SignalEvent which is the only command listed under the NWScript drop-down. :: My scripting procedure up to this point has been to use the Lexicon to locate some construct (I'll avoid the term "function" temporarily for the sake of clarity here), examine an example where it is used and mimic its application. Hopefully, its use as a function or command is reflected in the sample code and therefore transparent to the script mechanics themselves for me. Now that I understand what the difference is between functions and commands, I agree that "Language reference" further confuses the issue. IMO, anyway. --Iconclast (talk) 08:25, October 9, 2013 (UTC) ::* Commands are hard-coded, functions (as seen in category:NWScript functions) are defined in an include file. The lexicon does mark which functions are from an include file, but doesn't lump them together categorically. The script editor in the Toolset does separate the two by displaying functions defined in an include file in bold, while commands are not bolded.WhiZard (talk) 13:55, October 9, 2013 (UTC) ::* Probably the main distinction to keep in mind is that for a function, you can look at how it does what it does (because it is implemented in NWScript). Commands are black voodoo whose innards are known only to BioWare. Which is the reason I've only been trying to get the commands documented (questions about what functions do can be answered by looking at their implementations, if you know enough NWScript). My goal has been breadth first, depth (addressing different levels of knowledge) later. Also, echo what WhiZard wrote, with the acknowledgement that functions can exist in your main script as well as in #include files. --The Krit (talk) 00:40, October 10, 2013 (UTC)